3.305 \(\int \frac{\cos ^3(x)}{a+b \sin ^2(x)} \, dx\)

Optimal. Leaf size=36 \[ \frac{(a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}-\frac{\sin (x)}{b} \]

[Out]

((a + b)*ArcTan[(Sqrt[b]*Sin[x])/Sqrt[a]])/(Sqrt[a]*b^(3/2)) - Sin[x]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0563766, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3190, 388, 205} \[ \frac{(a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}-\frac{\sin (x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^3/(a + b*Sin[x]^2),x]

[Out]

((a + b)*ArcTan[(Sqrt[b]*Sin[x])/Sqrt[a]])/(Sqrt[a]*b^(3/2)) - Sin[x]/b

Rule 3190

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\cos ^3(x)}{a+b \sin ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1-x^2}{a+b x^2} \, dx,x,\sin (x)\right )\\ &=-\frac{\sin (x)}{b}+\frac{(a+b) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\sin (x)\right )}{b}\\ &=\frac{(a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}-\frac{\sin (x)}{b}\\ \end{align*}

Mathematica [A]  time = 0.023088, size = 36, normalized size = 1. \[ \frac{(a+b) \tan ^{-1}\left (\frac{\sqrt{b} \sin (x)}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2}}-\frac{\sin (x)}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^3/(a + b*Sin[x]^2),x]

[Out]

((a + b)*ArcTan[(Sqrt[b]*Sin[x])/Sqrt[a]])/(Sqrt[a]*b^(3/2)) - Sin[x]/b

________________________________________________________________________________________

Maple [A]  time = 0.045, size = 45, normalized size = 1.3 \begin{align*} -{\frac{\sin \left ( x \right ) }{b}}+{\frac{a}{b}\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\arctan \left ({\sin \left ( x \right ) b{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(a+b*sin(x)^2),x)

[Out]

-sin(x)/b+1/b/(a*b)^(1/2)*arctan(sin(x)*b/(a*b)^(1/2))*a+1/(a*b)^(1/2)*arctan(sin(x)*b/(a*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*sin(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.00546, size = 262, normalized size = 7.28 \begin{align*} \left [-\frac{2 \, a b \sin \left (x\right ) + \sqrt{-a b}{\left (a + b\right )} \log \left (-\frac{b \cos \left (x\right )^{2} + 2 \, \sqrt{-a b} \sin \left (x\right ) + a - b}{b \cos \left (x\right )^{2} - a - b}\right )}{2 \, a b^{2}}, -\frac{a b \sin \left (x\right ) - \sqrt{a b}{\left (a + b\right )} \arctan \left (\frac{\sqrt{a b} \sin \left (x\right )}{a}\right )}{a b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*sin(x)^2),x, algorithm="fricas")

[Out]

[-1/2*(2*a*b*sin(x) + sqrt(-a*b)*(a + b)*log(-(b*cos(x)^2 + 2*sqrt(-a*b)*sin(x) + a - b)/(b*cos(x)^2 - a - b))
)/(a*b^2), -(a*b*sin(x) - sqrt(a*b)*(a + b)*arctan(sqrt(a*b)*sin(x)/a))/(a*b^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**3/(a+b*sin(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.11156, size = 41, normalized size = 1.14 \begin{align*} \frac{{\left (a + b\right )} \arctan \left (\frac{b \sin \left (x\right )}{\sqrt{a b}}\right )}{\sqrt{a b} b} - \frac{\sin \left (x\right )}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(a+b*sin(x)^2),x, algorithm="giac")

[Out]

(a + b)*arctan(b*sin(x)/sqrt(a*b))/(sqrt(a*b)*b) - sin(x)/b